The ability to precisely mask or select an irregularly shaped area of an image or video frame is an essential requirement of image-editing and video-editing applications.